import uvicorn
import os
from fastapi import FastAPI
from routers import mcp, general, web_scrape
from dotenv import load_dotenv

load_dotenv()
# Create FastAPI application with metadata
app = FastAPI(
    title="FastAPI SCRAPE POETRY SSE",
    description="A fastapi of Server-Sent Events with Model Context Protocol integration",
    version="0.0.1",
)

app.include_router(mcp.router)
app.include_router(general.router)
app.include_router(web_scrape.router)




# Environment variable configuration
HOST = os.getenv("HOST", "0.0.0.0")
PORT = int(os.getenv("PORT", "8000"))


def run():
    """Start the FastAPI server with uvicorn"""
    uvicorn.run(app, host=HOST, port=PORT, log_level="info")


if __name__ == "__main__":
    run()